package com.microservice.salmon.db.mapper;

import com.microservice.salmon.db.entities.Brand;
import com.microservice.salmon.db.entities.BrandCategory;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface BrandMapper extends Mapper<Brand> {

    /**
     * 新增商品分类和品牌中间表数据
     */
    int insertCategoryBrand(@Param("list") List<BrandCategory> list);

    int deleteCategoryBrand(@Param("brandId") Integer brandId);

    Brand selectBrandInfoByBrandId(@Param("brandId") Integer brandId);

    List<Brand> selectBrandInfoByCategoryId(@Param("categoryId") Integer categoryId);
}